﻿<html >
<head>
    <title>显示列设置</title>
    <script type="text/javascript" src="../../Scripts/bootstrap/js/jquery.min.js"></script>
    <script src="../../Scripts/QueryString2016.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../Scripts/config.js"  ></script>
    <script src="../Gener.js?va2=2" type="text/javascript"></script>
    <link href="../../../DataUser/Style/ccbpm.css" rel="Stylesheet" />
    <script type="text/javascript">

        //页面启动函数.
        $(function () {

            var ensName = GetQueryString("EnsName");

            //全局配置.
            var en = new Entity("BP.Sys.EnCfg");
            en.No = ensName;
            en.Retrieve();

            //获得该实体的列.
            //var handler = new HttpHandler("BP.WF.HttpHandler.WF_Comm");

            var mapAttrs = new Entities("BP.Sys.MapAttrs");
            mapAttrs.Retrieve("FK_MapData", ensName);

            for (var i = 0; i < mapAttrs.length; i++) {

                var mapAttr = mapAttrs[i];

                var html = "";
                html += "<tr>";
                html += "<td>" + i + "</td>";
                html += "<td>" + mapAttr.KeyOfEn + "</td>";
                html += "<td>" + mapAttr.Name + "</td>";
                html += "</tr>";

                $("#Table1 tr:last").after(html);
            }


        });

        function Save() {

            var ensName = GetQueryString("EnsName");

            //全局配置.
            var en = new Entity("BP.Sys.EnCfg", ensName);
            en.CopyForm(); //从from里面copy数据.
            en.No = ensName;
            en.Update();

            window.location.href = window.location.href;
        }

        function Back() {
            var url = "SearchSetting.htm?EnsName=" + GetQueryString("EnsName");
            window.location.href = url;
        }

    </script>
</head>
<body>
<table id="Table1" style="width:96%;">
<caption>设置显示的列</caption>
<tr>
<th >配置项</th>
<th>内容</th>
<th>信息</th>
</tr>


</table>

该功能尚未完成.

<input type="button" value="保存"  onclick="Save()" />
<input type="button" value="返回基本设置"  onclick="Back()" />


</body>
</html>
